package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MeowPurchaseOrdersMapper;
import com.ruoyi.system.domain.MeowPurchaseOrders;
import com.ruoyi.system.service.IMeowPurchaseOrdersService;
import com.ruoyi.common.core.text.Convert;

/**
 * 采购订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-24
 */
@Service
public class MeowPurchaseOrdersServiceImpl implements IMeowPurchaseOrdersService 
{
    @Autowired
    private MeowPurchaseOrdersMapper meowPurchaseOrdersMapper;

    /**
     * 查询采购订单
     * 
     * @param orderId 采购订单主键
     * @return 采购订单
     */
    @Override
    public MeowPurchaseOrders selectMeowPurchaseOrdersByOrderId(String orderId)
    {
        return meowPurchaseOrdersMapper.selectMeowPurchaseOrdersByOrderId(orderId);
    }

    /**
     * 查询采购订单列表
     * 
     * @param meowPurchaseOrders 采购订单
     * @return 采购订单
     */
    @Override
    public List<MeowPurchaseOrders> selectMeowPurchaseOrdersList(MeowPurchaseOrders meowPurchaseOrders)
    {
        return meowPurchaseOrdersMapper.selectMeowPurchaseOrdersList(meowPurchaseOrders);
    }

    /**
     * 新增采购订单
     * 
     * @param meowPurchaseOrders 采购订单
     * @return 结果
     */
    @Override
    public int insertMeowPurchaseOrders(MeowPurchaseOrders meowPurchaseOrders)
    {
        return meowPurchaseOrdersMapper.insertMeowPurchaseOrders(meowPurchaseOrders);
    }

    /**
     * 修改采购订单
     * 
     * @param meowPurchaseOrders 采购订单
     * @return 结果
     */
    @Override
    public int updateMeowPurchaseOrders(MeowPurchaseOrders meowPurchaseOrders)
    {
        return meowPurchaseOrdersMapper.updateMeowPurchaseOrders(meowPurchaseOrders);
    }

    /**
     * 批量删除采购订单
     * 
     * @param orderIds 需要删除的采购订单主键
     * @return 结果
     */
    @Override
    public int deleteMeowPurchaseOrdersByOrderIds(String orderIds)
    {
        return meowPurchaseOrdersMapper.deleteMeowPurchaseOrdersByOrderIds(Convert.toStrArray(orderIds));
    }

    /**
     * 删除采购订单信息
     * 
     * @param orderId 采购订单主键
     * @return 结果
     */
    @Override
    public int deleteMeowPurchaseOrdersByOrderId(String orderId)
    {
        return meowPurchaseOrdersMapper.deleteMeowPurchaseOrdersByOrderId(orderId);
    }
}
